package com.hinnotek.amoeba.ui.activity.old

import android.os.Bundle
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.lee.common.base.BaseActivity
import com.hinnotek.amoeba.R
import com.hinnotek.amoeba.adapters.old.PurchaseOrderDetailAdapter
import com.hinnotek.amoeba.databinding.ActivityPurchaseOrderDetailBinding
import com.hinnotek.amoeba.utilities.IntentUtils
import java.util.*


class PurchaseOrderActivity : BaseActivity<ActivityPurchaseOrderDetailBinding>() {
    private var mAdapter: PurchaseOrderDetailAdapter? = null
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_purchase_order_detail)
        setLeftVisible(true)
        setTitle("采购单")

    }

    override fun initVew() {

        bindingView.rbTo.setOnClickListener {
            IntentUtils.startActivity(
                mContext,
                ProjectRequirementsDetailsActivity::class.java
            )
        }
        val manager = LinearLayoutManager(this)
        manager.orientation = RecyclerView.VERTICAL
        bindingView.rlvUser.layoutManager = manager
        bindingView.rlvUser.adapter = PurchaseOrderDetailAdapter().also { mAdapter = it }
    }

    override fun setData() {
        val list: MutableList<String> = ArrayList()
        for (i in 0..1) {
            list.add("")
        }
        mAdapter?.setList(list)
    }
}